package org.opens.sql.constant;

/**
 * 功能描述
 *
 * @author: zhangyuming
 * @date: 2023/7/7 17:13
 */
public enum GenServiceMode {
    MYBATIS_PLUS("MYBATIS_PLUS", "mybatis-plus生成模式"),
    SPRING("SPRING", "最简单的基于spring的生成方式");

    private String value;

    private String desc;

    GenServiceMode(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public static GenServiceMode getInstance(String value) {
        for (GenServiceMode genServiceMode : GenServiceMode.values()) {
            if (genServiceMode.getValue().equals(value)) {
                return genServiceMode;
            }
        }
        return null;
    }

}
